﻿using QuickDotNetCore.Attributrs;
using QuickDotNetCore.BaseModels;
using SqlSugar;

namespace QuickDotNetCore.Models
{
    [AutoMapper]
    [SugarTable("User")]
    public class UserDO:BaseUser
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }

        public string UserName { get; set; }

        public string Password { get; set; }

        public string Role { get; set; }

        public string Email { get; set; }


        [SqlSugar.SugarColumn(IsIgnore = true)]
        public override string JwtName => UserName;
        [SqlSugar.SugarColumn(IsIgnore = true)]
        public override string JwtID => Id.ToString();
        [SqlSugar.SugarColumn(IsIgnore = true)]
        public override string JwtRole => Role;
        [SqlSugar.SugarColumn(IsIgnore = true)]
        public override string JwtPassword => Password;
    }
}
